package com.xq.model;


public class User extends BaseModel<User> {

	public final static String TABLE_NAME = "xq_user";
	public final static  User dao = new User();
	
	public boolean isPhoneRegistered(long phone)
	{
		User user = findUserByPhone(phone);
		return user == null? false: true;
	}
	
	public User findUserByPhone(long phone)
	{
		return findFirst("select * from xq_user where phone = ? limit 1", phone);
	}
	
	public void register(User user)
	{
		user.save();
	}
	
}
